<?php


namespace App\Models;


use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class SchoolClassAndGrade extends Model
{
    use SoftDeletes;

    protected $table = 'school_class_and_grade';
    public $timestamps = false;
    public $fillable = ['school_id', 'class_name', 'grade', 'status', 'club_id'];

    public function class_and_grade_time()
    {
        return $this->hasMany(ClassAndGradeTime::class, 'class_and_grade_id', 'id');
    }

    public function club()
    {
        return $this->belongsTo(Club::class,'club_id','id');
    }
}
